<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>Axios-delete练习</title>
	</head>
	<body>
		<h1>Axios远程调用练习</h1>
		
		<script src="../js/axios.js"></script>
		<script>
			/* GET请求的方式 与Delete请求的方式一致 */
			//1.删除name="xxxx"的数据 使用params 对象的方式实现
			let user = {
				name: "星期五"
			}
			axios.delete("http://localhost:8090/deleteUserByName",{
				params: user
			}).then(result => {
				console.log(result.data)
			})
			
			//2.删除name="xxx",sex="xxx" 使用restFul风格实现
			axios.delete("http://localhost:8090/user/宵夜吃什么/女")
				 .then(result => {
					 console.log(result.data)
				 })
		</script>
	</body>
</html>